/**
 * \file
 *          telemainBLRpcCommonDesc.cpp
 * \brief
 *          RPC common descriptor implementation file.
 *
 * \par Author (last changes):
 *          - Song Yang
 *          - Phone +65 65800179
 *          - Continental Automotive Singapore
 * \par Project Leader:
 *          - Mandy Sin
 *          - Phone +65 67799 819
 *          - Mandy.Sin@continental-corporation.com
 * \par Responsible Developer:
 *          - Song Yang
 *          - Phone +65 65800179
 *          - Continental Automotive Singapore
 * \par Responsible Architect:
 *          - Goh Hoe Chun
 *          - Phone +65 67799 586
 *          - Hoe.Chun.Goh@continental-corporation.com
 *
 * \par Project:
 *      DPCA2
 *
 * \par SW-Component:
 *      telemainBLRpcCommonDesc
 *
 * \par SW-Package:
 *      Telematics Main
 *
 * \par SW-Module:
 *      Telematics Main
 *
 * \par SW-Architecture Specification:
 *      DPCA_SW_AD_IMX
 *      003
 *
 * \par SW-Design Specification:
 *      DPCA_your_module_SW_DD
 *      your_doc_number
 *
 * \par SW-Test Case Specification:
 *      DPCA_your_module_SW_TS
 *      your_doc_number
 *
 * \par CM-Info:
 *      - telemainBLRpcCommonDesc.cpp-1:incl:DPCARSgp#1
 *      - uidc1282
 *
 * \note
 *      This is a note.
 *
 * \bug
 *      - there are no known bugs
 *
 * \par Module-History:
 *
 * \verbatim
 * Date                Author                 Reason
 * 20 Dec 2012         Song Yang           Initial Creation
 * The latest entry at the head of the history list.
 * \endverbatim
 *
 * \par Copyright Notice:
 * Copyright (C) 2011 Continental Automotive Singapore Pte Ltd.
 * Alle Rechte vorbehalten. All Rights Reserved.\n
 * The reproduction, transmission or use of this document or its contents is
 * not permitted without express written authority.\n
 * Offenders will be liable for damages. All rights, including rights created
 * by patent grant or registration of a utility model or design, are reserved.
 *
 * \ingroup GEN_TELE_MAIN
 */

#include "teleMainBLRpcCommonDesc.h"
#include "teleMainBL.h"


//==============================================================================
// IMPLEMENTATION
//==============================================================================

/**
 * \brief	Constructor of teleMainBLRpcCommonDesc
 *
 * TestID: 
 *
 * \param p [in] struct used by RPC framework which consists of calling function id,
 * input & output parameters and etc
 *
 * \return - none
 * */
teleMainBLRpcCommonDesc::teleMainBLRpcCommonDesc(RPC_IOCTL_PTR p) : pIOCTL(p) {
    //#[ operation teleMainBLRpcCommonDesc(RPC_IOCTL_PTR)
    //#]
}

/**
 * \brief	destructor of teleMainBLRpcCommonDesc

 *
 * \param - none
 *
 * \return - none
 * */
teleMainBLRpcCommonDesc::~teleMainBLRpcCommonDesc() {
    //#[ operation ~teleMainBLRpcCommonDesc()
    //#]
}

/**
 * \brief  execute the corresponding RPC function by caller from another threads
 *
 * TestID: 
 *
 * \param - none
 *
 * \return - none
 */
void teleMainBLRpcCommonDesc::__execute() const {
    //#[ operation __execute()

    if (NIL != this->pIOCTL->ac)
    {
    	switch(this->pIOCTL->dmFuncID)
    	{
		 case FUNCID_GenericHMI_SET_AlertPopupStatus:{
		 	(static_cast<teleMainBL*>(this->pIOCTL->ac))->__GenHMI_SetAlertPopupStatus(this->pIOCTL->lpInBuffer, this->pIOCTL->nInBufferSize);
			break;
		 }
         case FUNCID_GenericHMI_SET_QuestionPopupStatus:{
		 	(static_cast<teleMainBL*>(this->pIOCTL->ac))->__GenHMI_SetQuestionPopupStatus(this->pIOCTL->lpInBuffer, this->pIOCTL->nInBufferSize);
			break;
		 }
         case FUNCID_GenericHMI_SET_ListPopupStatus:{
		 	(static_cast<teleMainBL*>(this->pIOCTL->ac))->__GenHMI_SetListPopupStatus(this->pIOCTL->lpInBuffer, this->pIOCTL->nInBufferSize);
			break;
		 }
         case FUNCID_GenericHMI_POST_ATBMessage:{
            (static_cast<teleMainBL*>(this->pIOCTL->ac))->__GenHMI_PostATBMessage(this->pIOCTL->lpInBuffer, this->pIOCTL->nInBufferSize);
            break;
         }
         case FUNCID_Admin_SET_TestVINConflict:
        {
            (static_cast<teleMainBL*>(this->pIOCTL->ac))->__Admin_DetectVINConflict(this->pIOCTL->lpInBuffer, this->pIOCTL->nInBufferSize);
            break;
        }
    	default:
    		break;
    	}
    }
    else
    {
        // will be replaced by assert or other fallback strategy
    }

    //#]
}

